<h1>Approval Queue</h1>

<%% form_for(:approval, :url => approvals_path, :html => {:method => :get}) do |f| %>
  <%% unless @conditions[:state].is_a?(Array) # History page shouldn't allow selecting different states %>
    <%%= label_tag(:state) %>
    <%%= select_tag(:state, options_for_select(Approval.options_for_state, @conditions[:state])) %>
  <%% end %>
<% if owner? %>  <%%= label_tag(:owner_id) %>
  <%%= select_tag(:owner_id, options_for_select(Approval.options_for_assigned_owners, @conditions[:owner_id]), :prompt => 'All Users') %>
<% end %>  <%%= label_tag(:item_type) %>
  <%%= select_tag(:item_type, options_for_select(Approval.options_for_type, @conditions[:item_type]), :prompt => 'All Types') %>
  <%%= f.submit('Filter') %>
<%% end %>

<%%= render :partial => @table_partial %>
<% if scripts? %>
<%%= javascript_include_tag 'jquery.form.js', 'approvals.js' %><% end %>
